﻿using System;
using System.Collections.Generic;
using System.Text;

namespace CallingClassMember

{

    class Book
    {
        public int Id { get; set; }
        private string Name { get; set; }
        public double Price { get; set; }
        

        

        public  void SetBook(int id,string name,double price)
        {
            Id = id;
            Name = name;
            Price = price;
        }
        public void PrintMsg()
        {
            Console.WriteLine("图书编号"+Id);
            Console.WriteLine("图书名称"+Name);
            Console.WriteLine("图书价格"+Price);
        }
    }
}
